package com.yenlien.traceyun.plant.entity;

import com.yenlien.traceyun.business.entity.BaseSoil;
import com.yenlien.traceyun.business.entity.TraceScanEntity;
import com.yenlien.traceyun.business.trace.Trace;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * 种植表
 *
 * @author maybe
 * @date 2020年7月24日
 */
@Entity
@Table(name = "t_plant")
@Trace(appName = "plant", stepName = "plant", order = 1)
public class Plant extends TraceScanEntity {
    @Column
    private String jyId;            //基源Id
    @Column
    private String jyName;            //基源名称
    @Column
    private String plantName;        //种苗名称
    @Column
    private String plantImg;        //种苗图片
    @Column
    private String source;            //种苗来源
    @Column
    private String company;            //种苗企业
    @Column
    private String way;                //种植方式


    @Column(columnDefinition = "longtext")
    private String soilId;            //地块ID     type=2      多ID通过逗号 , 分割


    private String plantBaseId;        //种植基地ID  type=1


    @Column(columnDefinition = "longtext")
    private String soilName;        //地块名称          多选名称 通过逗号 , 分割
    @Column
    private String plantArea;        //种植面积
    @Column
    private String plantBaseName;    //种植基地名称
    @Column
    private String plantNumber;        //种苗数量
    @Column
    private String units;            //种苗单位

    @Column
    private String batch;            //种植批次号
    @Column
    @ApiModelProperty(value = "种植时间()")
    private String plantTime;        //种植时间
    @Column
    private String plantUserId;        //种植人ID
    @Column
    private String plantUserName;    //种植人姓名
    @Column
    private String responsibleName;    //负责人姓名

    @Column
    private String reapTime;        //预计收获时间
    @Column
    private String placeDescription;//产地描述

    @Column
    private int reapStatus;            //采收状态(0：未采收，1：部分采收，2：全部采收)



//	@Column
//	private String baseSoilId;		//关联基地表（外键）
    @Transient
    @ApiModelProperty(value = "农事操作")
    private List<Farm> farmList;
    @Transient
    @ApiModelProperty(value = "采收记录")
    private List<Reap> reapList;
    @Transient
    @ApiModelProperty(value = "地块信息")
    private BaseSoil baseSoil;
    @Transient
    @ApiModelProperty(value = "已生长天数, 预计收获时间(reapTime) - 种植时间(plantTime)")
    private Integer growDays;




    public BaseSoil getBaseSoil() {
        return baseSoil;
    }

    public void setBaseSoil(BaseSoil baseSoil) {
        this.baseSoil = baseSoil;
    }

    public Integer getGrowDays() {
        return growDays;
    }

    public void setGrowDays(Integer growDays) {
        this.growDays = growDays;
    }

    public List<Reap> getReapList() {
        return reapList;
    }

    public void setReapList(List<Reap> reapList) {
        this.reapList = reapList;
    }

    public List<Farm> getFarmList() {
        return farmList;
    }

    public void setFarmList(List<Farm> farmList) {
        this.farmList = farmList;
    }

    public String getJyId() {
        return jyId;
    }

    public String getResponsibleName() {
        return responsibleName;
    }

    public void setResponsibleName(String responsibleName) {
        this.responsibleName = responsibleName;
    }

    public void setJyId(String jyId) {
        this.jyId = jyId;
    }

    public String getJyName() {
        return jyName;
    }

    public void setJyName(String jyName) {
        this.jyName = jyName;
    }

    public String getPlantName() {
        return plantName;
    }

    public void setPlantName(String plantName) {
        this.plantName = plantName;
    }

    public String getPlantImg() {
        return plantImg;
    }

    public void setPlantImg(String plantImg) {
        this.plantImg = plantImg;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getWay() {
        return way;
    }

    public void setWay(String way) {
        this.way = way;
    }

    public String getSoilId() {
        return soilId;
    }

    public void setSoilId(String soilId) {
        this.soilId = soilId;
    }

    public String getSoilName() {
        return soilName;
    }

    public void setSoilName(String soilName) {
        this.soilName = soilName;
    }

    public String getPlantArea() {
        return plantArea;
    }

    public void setPlantArea(String plantArea) {
        this.plantArea = plantArea;
    }

    public String getPlantBaseId() {
        return plantBaseId;
    }

    public void setPlantBaseId(String plantBaseId) {
        this.plantBaseId = plantBaseId;
    }

    public String getPlantBaseName() {
        return plantBaseName;
    }

    public void setPlantBaseName(String plantBaseName) {
        this.plantBaseName = plantBaseName;
    }

    public String getPlantNumber() {
        return plantNumber;
    }

    public void setPlantNumber(String plantNumber) {
        this.plantNumber = plantNumber;
    }

    public String getUnits() {
        return units;
    }

    public void setUnits(String units) {
        this.units = units;
    }

    public String getBatch() {
        return batch;
    }

    public void setBatch(String batch) {
        this.batch = batch;
    }

    public String getPlantTime() {
        return plantTime;
    }

    public void setPlantTime(String plantTime) {
        this.plantTime = plantTime;
    }

    public String getPlantUserId() {
        return plantUserId;
    }

    public void setPlantUserId(String plantUserId) {
        this.plantUserId = plantUserId;
    }

    public String getPlantUserName() {
        return plantUserName;
    }

    public void setPlantUserName(String plantUserName) {
        this.plantUserName = plantUserName;
    }

    public String getReapTime() {
        return reapTime;
    }

    public void setReapTime(String reapTime) {
        this.reapTime = reapTime;
    }

    public String getPlaceDescription() {
        return placeDescription;
    }

    public void setPlaceDescription(String placeDescription) {
        this.placeDescription = placeDescription;
    }

    public int getReapStatus() {
        return reapStatus;
    }

    public void setReapStatus(int reapStatus) {
        this.reapStatus = reapStatus;
    }
}
